package com.kaifamiao.local;

import java.util.UUID;

public class Context {

    private static ThreadLocal<String> threadLocal = new ThreadLocal<>() {
        @Override
        protected String initialValue() {
            return UUID.randomUUID().toString().replace("-", "").toUpperCase();
        }
    };

    public static String get() {
        return threadLocal.get();
    }

    public static void set(String value) {
        threadLocal.set(value);
    }

    public static void remove() {
        threadLocal.remove();
    }

}
